<!DOCTYPE html>
<html>
<head>
    <!--[if lt IE 7]>
    <div class="ie6_error">还在用<strong>漏洞百出的IE6浏览器</strong>么？为了您的网络安全，请升级浏览器 <a target="_blank"
                                                                               href="http://browsehappy.com">立即升级</a>
    </div>
    <![endif]-->

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <meta charset="utf-8">
    <title>首页-文具1号</title>
    <meta name="description"
          content="文具1号作为上海办公用品供货商公司,专为世界500强企业及SOHO办公族提供网上商城一站式办公耗材批发及采购服务,一站式选购办公日用文具用品,厂家直销,好货又便宜【阳光采购就上文具1号 阳光价格 老板放心 品质保障 员工省力】"/>
    <meta name="keywords" content="办公用品,办公文具,办公文具网站,文具网站,办公用品网,文具采购网,金万年"/>
    <meta name="copyright" content="上海易推信息科技有限公司"/>
    <meta name="renderer" content="webkit">
    <base href="<?php echo base_url(); ?>"/>
    <link rel="shortcut icon" href="public/images/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="public/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/index.css?v=2000000"/>
    <link type="text/css" rel="stylesheet" href="public/css/owl.carousel.css">
    <link type="text/css" rel="stylesheet" href="public/css/owl.theme.css">

    <!--[if lte IE 9]>
    <script type="text/javascript" src="public/js/html5shiv-printshiv-3.js"></script>
    <![endif]-->
</head>
<body>
<div class="bg">
    <!--common - head -->
    <?php $this->load->view('common/header.php'); ?>

    <!--common - head end-->

    <div class="container mt20 bg-padding-inside">
        <div class="index-box index-box1">
            <!--侧边快捷入口-->
            <div class="sidebar-wrapper box-shadow">

                <a href="<?php echo $this->config->item('shop_url'); ?>bBMember-myGoodsLibrary.html"
                   class="sidebar-item sidebar-item02" style="padding-top: 70px;">
                    <span class="icon bg-btn_storehouse_n"></span>
                    <span class="text">企业清单</span>
                </a>
                <a href="<?php echo $this->config->item('shop_url'); ?>mMPur-mylist.html"
                   class="sidebar-item sidebar-item03">
                    <span class="icon bg-btn_bill_n"></span>
                    <span class="text">限购清单</span>
                </a>
            </div>
            <!-- admin个人中心-->
            <?php if ($anonymous == 1): ?>
                <div class="index-myInfo box-shadow">
                    <div class="index-myInfo-top">
                        <a href="<?php echo base_url(); ?>index/index_desk" class="btn-about-workbench">了解工作台>></a>
                        <img src="public/images/img_avatar_admin.png" class="index-myInfo-icon" alt="">
                        <div class="index-myInfo-top-right-wrapper">
                            <p class="index-myInfo-top-right">
                                欢迎进入文具1号企业工作台！
                            </p>
                            <p class="index-myInfo-top-right">
                                当前身份：游客
                            </p>
                        </div>
                    </div>
                    <div class="index-myInfo-btm ">
                        <div class="index-myInfo-btm-item ">
                            <a href="javascript:;" onclick="login()" class="add-btn bg-btn_add_n"></a>
                            <span class="num">0</span>
                            <span class="name">管理账户</span>
                        </div>
                        <div class="index-myInfo-btm-item ">
                            <a href="javascript:;" onclick="login()" class="add-btn bg-btn_add_n"></a>
                            <span class="num">0</span>
                            <span class="name">用户账户</span>
                        </div>
                        <div class="index-myInfo-btm-item ">
                            <span class="num">0</span>
                            <span class="name">待审批</span>
                        </div>
                    </div>
                </div>

            <?php elseif ($identity == 1): ?>
                <!--                --><?php //echo $identity ?>
                <div class="index-myInfo box-shadow">
                    <div class="index-myInfo-top">
                        <a href="<?php echo base_url(); ?>index/index_desk" class="btn-about-workbench">了解工作台>></a>
                        <img src="public/images/img_avatar_admin.png" class="index-myInfo-icon" alt="">
                        <div class="index-myInfo-top-right-wrapper">
                            <p class="index-myInfo-top-right">
                                当前身份：超级管理员（admin）
                            </p>
                            <p class="index-myInfo-top-right">
                                所属公司：<?php echo $company['company']; ?>
                            </p>
                        </div>
                    </div>
                    <div class="index-myInfo-btm ">
                        <div class="index-myInfo-btm-item ">
                            <a href="<?php echo base_url(); ?>cost_center/create_manager_index"
                               class="add-btn bg-btn_add_n"></a>
                            <a href="<?php echo base_url('index/index_admin_manage'); ?>"><span
                                        class="num"><?php echo count($manage) ?></span></a>
                            <span class="name">管理账户</span>
                        </div>
                        <div class="index-myInfo-btm-item">
                            <a href="<?php echo base_url(); ?>cost_center/create_user_index"
                               class="add-btn bg-btn_add_n"></a>
                            <a href="<?php echo base_url('index/index_user_manage'); ?>"><span
                                        class="num"><?php echo count($user) ?></span></a>
                            <span class="name">用户账户</span>
                        </div>
                        <div class="index-myInfo-btm-item ">
                            <a href="<?php echo base_url('approve/index'); ?>?id=2"><span
                                        class="num"><?php echo $admin_approve_order ?></span></a>
                            <span class="name">待审批</span>
                        </div>
                    </div>
                </div>
            <?php elseif ($identity == 2): ?>
                <!-- user/manage个人中心-->
                <div class="index-myInfo box-shadow">
                    <div class="index-myInfo-top">

                        <img src="public/images/img_avatar_admin.png" class="index-myInfo-icon" alt="">
                        <div class="index-myInfo-top-right-wrapper">
                            <p class="index-myInfo-top-right">
                                <?php if ($identity == 2): ?>
                                    所属公司：<?php echo $cost['company'] ?>
                                    <span class="color-red">【管理账户】</span>
                                <?php elseif ($identity == 3): ?>
                                    所属公司：<?php echo $cost['company'] ?>
                                    <span class="color-red">【用户账号】</span>
                                <?php endif; ?>
                            </p>
                            <p class="index-myInfo-top-right">
                                <span class="half">成本中心：<?php echo $cost['coname'] ?></span>
                                <span class="half">上级账户：<?php echo $cost['cutname'] ?></span>
                            </p>
                            <p class="index-myInfo-top-right">
                                <span class="half">采购账号：<?php echo $cost['username'] ?> </span>
                                <span class="half">上级邮箱：<?php echo $cost['cutemail'] ?></span>
                            </p>

                        </div>


                    </div>

                    <div class="index-myInfo-btm ">
                        <div class="index-myInfo-btm-item ">
                            <a href="<?php echo base_url(); ?>cost_center/create_user_index"
                               class="add-btn bg-btn_add_n"></a>
                            <a href="<?php echo base_url('index/index_user_manage'); ?>"><span
                                        class="num"><?php echo count($user) ?></span></a>
                            <span class="name">用户账户</span>
                        </div>
                        <div class="index-myInfo-btm-item ">
                            <a href="<?php echo base_url('approve/index?id=2'); ?>"><span
                                        class="num"><?php echo $manager_approve_order ?></span></a>
                            <span class="name">待审批</span>
                        </div>
                        <div class="index-myInfo-btm-item ">
                            <a href="<?php echo base_url('order/common_order'); ?>?id=4"><span
                                        class="num"><?php echo count($order) ?></span></a>
                            <span class="name">待支付</span>
                        </div>
                    </div>
                </div>
            <?php else: ?>
                <!-- user/manage个人中心-->
                <div class="index-myInfo box-shadow">
                    <div class="index-myInfo-top">

                        <img src="public/images/img_avatar_admin.png" class="index-myInfo-icon" alt="">
                        <div class="index-myInfo-top-right-wrapper">
                            <p class="index-myInfo-top-right">
                                <?php if ($identity == 2): ?>
                                    所属公司：<?php echo $cost['company'] ?>
                                    <span class="color-red">【管理账户】</span>
                                <?php elseif ($identity == 3): ?>
                                    所属公司：<?php echo $cost['company'] ?>
                                    <span class="color-red">【用户账号】</span>
                                <?php endif; ?>
                            </p>
                            <p class="index-myInfo-top-right">
                                <span class="half">成本中心：<?php echo $cost['coname'] ?></span>
                                <span class="half">上级账户：<?php echo $cost['cutname'] ?></span>
                            </p>
                            <p class="index-myInfo-top-right">
                                <span class="half">采购账号：<?php echo $cost['username'] ?> </span>
                                <span class="half">上级邮箱：<?php echo $cost['cutemail'] ?></span>
                            </p>

                        </div>


                    </div>

                    <div class="index-myInfo-btm ">
                        <div class="index-myInfo-btm-item ">
                            <a href="<?php echo base_url('order/approve_order'); ?>?id=7"><span
                                        class="num"><?php echo count($status3) ?></span></a>
                            <span class="name">审批驳回</span>
                        </div>
                        <div class="index-myInfo-btm-item ">
                            <a href="<?php echo base_url('order/approve_order'); ?>?id=6"><span
                                        class="num"><?php echo count($status2) ?></span></a>
                            <span class="name">审批中</span>
                        </div>
                        <div class="index-myInfo-btm-item ">
                            <a href="<?php echo base_url('order/common_order'); ?>?id=4"><span
                                        class="num"><?php echo count($order) ?></span></a>
                            <span class="name">待支付</span>
                        </div>
                    </div>
                </div>
            <?php endif; ?>

            <?php if ($anonymous == true): ?>
                <div class="index-box1-right box-shadow">
                    <div class="box1-tit-wrapper">
                        <span class="tit">我的账期</span>
                    </div>
                    <div class="box1-cont">
                        <div class="apply-zq-box">
                            <a href="<?php echo base_url(); ?>customer/admin_apply_for_period_user_index"
                               onclick="login()"
                               onmousedown="window.location.reload('<?php echo base_url(); ?>customer/admin_apply_for_period_user_index')"
                               class="btn-apply-zq">申请成为账期用户，请先登录</a>
                            <p class="zq-privilege">
                                · 账期额度支付，让您更便捷交易<br>
                                · 资金按月结算，方式更轻松灵活
                                <!--  href="<?php echo base_url(); ?>customer/admin_apply_for_period_user_index"-->
                            </p>
                        </div>
                    </div>
                </div>
                <!--case5 游客-->
            <?php elseif ($identity == 1): ?>
                <!--账期-->
                <div class="index-box1-right box-shadow">
                    <div class="box1-tit-wrapper">
                        <span class="tit">我的账期</span>
                        <?php if ($admin_info['account_period_status'] == '1' || $admin_info['account_period_status'] == '2') { ?>
                            <a href="<?php echo base_url(); ?>customer/admin_apply_for_period_user_edit_index"
                               class="get-more">查看详情＞ </a>
                        <?php } ?>
                    </div>
                    <div class="box1-cont">
                        <?php if (isset($customer_info) && $customer_info['identity'] == 1) { ?>
                            <!-- admin --->
                            <?php if ($admin_info['is_account'] == 0 && $admin_info['account_period_status'] == 0) { ?>
                                <div class="box1-cont">
                                    <div class="apply-zq-box">
                                        <a href="<?php echo base_url(); ?>customer/admin_apply_for_period_user_index"
                                           class="btn-apply-zq">申请成为账期用户</a>
                                        <p class="zq-privilege">
                                            · 账期额度支付，让您更便捷交易<br>
                                            · 资金按月结算，方式更轻松灵活
                                        </p>
                                    </div>
                                </div>  <!--case5  非账期用户，还未申请-->
                            <?php } else { ?>
                                <?php if ($admin_info['account_period_status'] == 1) { ?>
                                    <div class="budget-box ">  <!--case1  您的资料正在审核中-->
                                        <div class="payment-audit-status-top">
                                            <p class="payment-audit-status-title">
                                                <span class="icon bg-icon_ziliaoshenhe">审核中</span>
                                                您的资料正在审核中
                                            </p>
                                            <p class="payment-audit-status-p tac">审核期间您依旧可以使用采购系统中其他功能</p>
                                            <p class="payment-audit-status-p02 tal">如有疑问，请联系您的专属客户经理 <span
                                                        class="icon icon-contact-customer-manager bg-btn_call_n"
                                                        style="position: absolute;z-index: 999999;margin-left: 6px;"
                                                        onclick="">联系电话</span>
                                            </p>
                                            <div class="show-more bg-bg_pop kf3" id="kf"
                                                 style="top: 85px;display: none">
                                                <?php if (!$manager_data) { ?>
                                                    <p class="cont">
                                                        您的专属客户经理正在安排中，如有疑问，可联系 <a class="a-color1" target="_blank"
                                                                                  href="http://care3.live800.com/live800/chatClient/chatbox.jsp?companyID=80000026&configID=2473">在线客服</a>，或<br>
                                                        拨打客服热线：4008-215-248<br>
                                                        (工作日9:00-21:30)
                                                    </p>
                                                <?php } else { ?>
                                                    <p class="cont ">
                                                        专属客户经理：<?php echo $manager_data['manager_name']; ?><br>
                                                        <?php if ($manager_data['manager_phone']): ?>
                                                            <span class="icon-tell bg-icon_phone">联系电话</span>
                                                            <?php echo $manager_data['manager_phone']; ?><br>
                                                        <?php endif; ?>
                                                        <?php if ($manager_data['parent_name']) { ?>
                                                            客户经理上级：<?php echo $manager_data['parent_name']; ?><br>
                                                            <?php if ($manager_data['parent_phone']): ?>
                                                                <span class="icon-tell bg-icon_phone">联系电话</span> <?php echo $manager_data['parent_phone']; ?>
                                                            <?php endif; ?>
                                                        <?php } ?>
                                                    </p>
                                                <?php } ?>
                                            </div>
                                        </div>
                                        <div class="payment-audit-status-btm">
                                            <span class="icon bg-icon_jiesuanzhangqi"></span>
                                            <div class="cont-right">
                                                <p class="p01">结算账期：/ <em class="color-red">（审核中）</em></p>
                                                <p class="p01">账期额度：￥0.00</p>
                                            </div>
                                        </div>
                                    </div><!--case1  您的资料正在审核中-->
                                <?php } else if ($admin_info['account_period_status'] == 2) { ?>
                                    <div class="budget-box ">
                                        <div class="payment-audit-status-top">
                                            <p class="payment-audit-status-title">
                                                <span class="icon bg-icon_weitongguo">审核未通过</span>
                                                您的资料审核未通过
                                            </p>
                                            <p class="payment-audit-status-p tac">
                                                未通过原因：<?php echo $period_apply_info['reason']; ?><br>
                                                请 <a class="a-color1"
                                                     href="<?php echo base_url(); ?>customer/admin_apply_for_period_user_edit_index">重新填写</a>
                                            </p>
                                            <p class="payment-audit-status-p02 tal">如有疑问，请联系您的专属客户经理 <span
                                                        class="icon icon-contact-customer-manager bg-btn_call_n"
                                                        style="position: absolute;z-index: 999999;margin-left: 6px;"
                                                        onmousedown="">联系电话</span>
                                            </p>
                                            <div class="show-more bg-bg_pop kf4" id="kf"
                                                 style="top: 95px;display: none;">
                                                <?php if (!$manager_data) { ?>
                                                    <p class="cont">
                                                        您的专属客户经理正在安排中，如有疑问，可联系 <a class="a-color1" target="_blank"
                                                                                  href="http://care3.live800.com/live800/chatClient/chatbox.jsp?companyID=80000026&configID=2473">在线客服</a>，或<br>
                                                        拨打客服热线：4008-215-248<br>
                                                        (工作日9:00-21:30)
                                                    </p>
                                                <?php } else { ?>
                                                    <p class="cont ">
                                                        专属客户经理：<?php echo $manager_data['manager_name']; ?><br>
                                                        <?php if ($manager_data['manager_phone']): ?>
                                                            <span class="icon-tell bg-icon_phone">联系电话</span>
                                                            <?php echo $manager_data['manager_phone']; ?><br>
                                                        <?php endif; ?>
                                                        <?php if ($manager_data['parent_name']) { ?>
                                                            客户经理上级：<?php echo $manager_data['parent_name']; ?><br>
                                                            <?php if ($manager_data['parent_phone']): ?>
                                                                <span class="icon-tell bg-icon_phone">联系电话</span> <?php echo $manager_data['parent_phone']; ?>
                                                            <?php endif; ?>
                                                        <?php } ?>
                                                    </p>
                                                <?php } ?>
                                            </div>
                                        </div>
                                        <div class="payment-audit-status-btm">
                                            <span class="icon bg-icon_jiesuanzhangqi"></span>
                                            <div class="cont-right">
                                                <p class="p01">结算账期：/ <em class="color-red">（审核未通过）</em></p>
                                                <p class="p01">账期额度：￥0.00</p>
                                            </div>
                                        </div>
                                    </div> <!--case2  您的资料审核未通过-->
                                <?php } else if ($admin_info['account_period_status'] == 3 || $admin_info['account_period_status'] == 4 || $admin_info['account_period_status'] == 5) { ?>
                                    <div class="budget-box ">
                                        <div class="payment-audit-status-top">
                                            <p class="payment-audit-status-title">
                                                <?php if ($admin_info['account_period_status'] == 5): ?>
                                                    <span class="icon bg-icon_weitongguo">审核未通过</span>
                                                <?php else: ?>
                                                    <span class="icon bg-icon_shenhetongguo">审核通过</span>
                                                <?php endif; ?>
                                                <?php if ($admin_info['account_period_status'] == 3): ?>
                                                    恭喜您审核通过，请尽快盖章签署协议
                                                <?php elseif ($admin_info['account_period_status'] == 4): ?>
                                                    您的合同正在审核中
                                                <?php elseif ($admin_info['account_period_status'] == 5): ?>
                                                    您的合同审核未通过
                                                <?php endif; ?>
                                            </p>
                                            <p class="payment-audit-status-p tal">
                                                <?php if ($admin_info['account_period_status'] == 5): ?>
                                                    ①下载<a target="_blank"
                                                          href="<?php echo $this->config->item('upload_url'); ?><?php echo $company_data['contract_doc_path']; ?>"
                                                          class="a-color1">《合约客户合同协议》</a><br>
                                                    ②合同审核未通过原因：<?php echo $period_apply_info['reason']; ?>
                                                    <a class="btn-uploading-protocol" href="javascript:void(0);"
                                                       onclick="open_upload();">重新上传</a>
                                                <?php else: ?>
                                                    ①下载
                                                    <a target="_blank"
                                                       href="<?php echo $this->config->item('upload_url'); ?><?php echo $company_data['contract_doc_path']; ?>"
                                                       class="a-color1">《合约客户合同协议》</a><br>
                                                    ②签字盖章后上传协议,通过后账期立即生效
                                                <?php endif; ?>
                                                <?php if (!$company_data['contract_pic_path']) { ?>
                                                    <a class="btn-uploading-protocol" href="javascript:void(0);"
                                                       onclick="open_upload();">上传</a>
                                                <?php } else { ?>
                                                    <?php if ($admin_info['account_period_status'] == 5): ?>
                                                    <?php else: ?>
                                                        <a class="btn-uploading-protocol-gray" target="_blank"
                                                           href="<?php echo $this->config->item('upload_url'); ?><?php echo $company_data['contract_pic_path']; ?>">已上传</a>
                                                    <?php endif; ?>
                                                <?php } ?>
                                            </p>
                                            <p class="payment-audit-status-p02 tal">如有疑问，请联系您的专属客户经理 <span
                                                        class="icon icon-contact-customer-manager bg-btn_call_n"
                                                        style="position: absolute;z-index: 999999;margin-left: 6px;"
                                                        onclick="">联系电话</span>
                                            </p>
                                            <div class="show-more bg-bg_pop kf1" id="kf"
                                                 style="top: 95px;display: none;">
                                                <?php if (!$manager_data) { ?>
                                                    <p class="cont">
                                                        您的专属客户经理正在安排中，如有疑问，可联系 <a class="a-color1" target="_blank"
                                                                                  href="http://care3.live800.com/live800/chatClient/chatbox.jsp?companyID=80000026&configID=2473">在线客服</a>，或<br>
                                                        拨打客服热线：4008-215-248<br>
                                                        (工作日9:00-21:30)
                                                    </p>
                                                <?php } else { ?>
                                                    <p class="cont ">
                                                        专属客户经理：<?php echo $manager_data['manager_name']; ?><br>
                                                        <?php if ($manager_data['manager_phone']): ?>
                                                            <span class="icon-tell bg-icon_phone">联系电话</span>
                                                            <?php echo $manager_data['manager_phone']; ?><br>
                                                        <?php endif; ?>
                                                        <?php if ($manager_data['parent_name']) { ?>
                                                            客户经理上级：<?php echo $manager_data['parent_name']; ?><br>
                                                            <?php if ($manager_data['parent_phone']): ?>
                                                                <span class="icon-tell bg-icon_phone">联系电话</span> <?php echo $manager_data['parent_phone']; ?>
                                                            <?php endif; ?>
                                                        <?php } ?>
                                                    </p>
                                                <?php } ?>
                                            </div>
                                        </div>
                                        <div class="payment-audit-status-btm">
                                            <span class="icon bg-icon_jiesuanzhangqi"></span>
                                            <div class="cont-right">
                                                <p class="p01">
                                                    结算账期：<?php echo $company_data['mark_invoice_type'] == 2 ? '次结' : '月结'; ?>
                                                    <em class="color-red">（未生效）</em></p>
                                                <p class="p01">
                                                    账期额度：￥
                                                    0.00<?php //echo number_format($budget_info['budget'], 2); ?></p>
                                            </div>
                                        </div>
                                    </div> <!--case3  恭喜您审核通过，请尽快盖章签署协议-->
                                <?php } else { ?>
                                    <div class="budget-box ">
                                        <div class="payment-audit-status-top" style="padding-bottom:10px;">
                                            <span class="icon-top bg-icon_jiesuanzhangqi"></span>
                                            <div class="cont-right">
                                                <?php if ($admin_info['account_period_type'] == '1'): ?>
                                                    <p class="p01">结算账期：月结</p>
                                                <?php elseif ($admin_info['account_period_type'] == '2'): ?>
                                                    <p class="p01">结算账期：次结</p>
                                                <?php endif; ?>
                                                <p class="p01">
                                                    账期额度：￥
                                                    <?php echo number_format($admin_info['account_period_quota'], 2); ?></p>
                                                <p class="p01">
                                                    剩余额度：￥
                                                    <?php echo number_format($admin_info['account_period_quota'] - $admin_info['account_period_quota_used'], 2); ?></p>
                                                <!--                                                <p class="p01">结算账期：月结</p>-->
                                                <!--                                                <p class="p01">-->
                                                <!--                                                    账期额度：￥-->
                                                <?php //echo number_format($budget_info['budget'], 2); ?><!--</p>-->
                                                <!--                                                <p class="p01">-->
                                                <!--                                                    剩余额度：￥-->
                                                <?php //echo number_format($budget_info['budget'] - $budget_info['used'], 2); ?><!--</p>-->
                                            </div>
                                            <p class="payment-audit-status-p02 tal">如有疑问，请联系您的专属客户经理 <span
                                                        class="icon icon-contact-customer-manager bg-btn_call_n"
                                                        style="position: absolute;z-index: 999999;margin-left: 6px;"
                                                        onclick="">联系电话</span>
                                            </p>
                                            <div class="show-more bg-bg_pop none kf2" id="kf"
                                                 style="top: 115px;display: none">
                                                <?php if (!$manager_data) { ?>
                                                    <p class="cont">
                                                        您的专属客户经理正在安排中，如有疑问，可联系 <a class="a-color1" target="_blank"
                                                                                  href="http://care3.live800.com/live800/chatClient/chatbox.jsp?companyID=80000026&configID=2473">在线客服</a>，或<br>
                                                        拨打客服热线：4008-215-248<br>
                                                        (工作日9:00-21:30)
                                                    </p>
                                                <?php } else { ?>
                                                    <p class="cont ">
                                                        专属客户经理：<?php echo $manager_data['manager_name']; ?><br>
                                                        <?php if ($manager_data['manager_phone']): ?>
                                                            <span class="icon-tell bg-icon_phone">联系电话</span>
                                                            <?php echo $manager_data['manager_phone']; ?><br>
                                                        <?php endif; ?>
                                                        <?php if ($manager_data['parent_name']) { ?>
                                                            客户经理上级：<?php echo $manager_data['parent_name']; ?><br>
                                                            <?php if ($manager_data['parent_phone']): ?>
                                                                <span class="icon-tell bg-icon_phone">联系电话</span> <?php echo $manager_data['parent_phone']; ?>
                                                            <?php endif; ?>
                                                        <?php } ?>
                                                    </p>
                                                <?php } ?>
                                            </div>
                                        </div>
                                        <div class="payment-audit-status-btm" style="padding-top:15px;">
                                            <div class="cont-right" style="padding-left:0; width:200px;">
                                                <p class="p01">
                                                    最后还款日：<?php echo isset($bill_info['should_repayment_date']) ? $bill_info['should_repayment_date'] : '/' ?></p>
                                                <p class="p01">
                                                    需还款金额：￥<?php echo isset($bill_info['money']) ? number_format($bill_info['money'], 2) : '0.00' ?></p>
                                            </div>
                                            <?php if (isset($bill_info['money']) && $bill_info['money'] > 0): ?>
                                                <?php if (date('Y-m-d') >= $bill_info['start_repayment_date']): ?>
                                                    <a href="<?php echo base_url('pay/index'); ?>"
                                                       class="want-to-reimbursement">
                                                        我要还款
                                                    </a>
                                                <?php endif; ?>
                                            <?php endif; ?>
                                        </div>
                                    </div> <!--case4  月结-->
                                <?php } ?>
                            <?php } ?>
                            <!-- admin end -->
                        <?php } else { ?>
                        <?php } ?>

                    </div>
                </div>
            <?php else: ?>
                <!--我的额度预算-->
                <div class="index-box1-right box-shadow">
                    <?php if (isset($single_quota) && isset($budget_info)): ?>
                        <div class="box1-tit-wrapper">
                            <span class="tit">我的额度预算</span>
                            <?php if ($budget_info['budget'] || $single_quota): ?>
                                <a href="<?php echo base_url(); ?>index/index_budget/" class="get-more">申请调整预算＞ </a>
                            <?php endif; ?>

                        </div>
                        <?php if ($budget_info['budget'] || $single_quota): ?>
                            <div class="box1-cont">
                                <div class="budget-box">
                                    <?php if ($budget_info['budget'] > 0): ?>
                                        <p class="tit-wrapper">
                                            <span class="budget-tit">可用预算：</span>
                                            <span class="budget-sum">总额度（月）：￥<?php echo isset($budget_info['budget']) ? $budget_info['budget'] : "0.00" ?></span>
                                        </p>
                                        <p class="budget-num">
                                            ￥<?php echo $budget_info['budget'] - $budget_info['used'] ?></p>
                                        <p class="budget-date"><?php echo date('Y/m/01', time()); ?>
                                            ~ <?php echo date('Y/m/t', time()); ?></p>
                                    <?php endif; ?>
                                    <?php if ($single_quota > 0): ?>
                                        <p class="tit-wrapper">
                                            <span class="tit">单品额度：</span>
                                        </p>
                                        <p class="budget-num">
                                            ￥<?php echo isset($single_quota) ? $single_quota : "0.00" ?></p>
                                    <?php endif; ?>
                                </div>
                            </div>
                        <?php else: ?>

                            <div class="box1-cont">
                                <div class="no-items pt30">
                                    <span class="icon-img_empty bg-img_eduyusuan"></span>
                                    <p class="text">您的账户当前没有限定额度，可随意购买</p>
                                </div>
                            </div>
                        <?php endif; ?>
                    <?php endif; ?>

                </div>

            <?php endif; ?>
        </div>

        <!--        限购商品 admin-->
        <?php if ($anonymous == false && $identity == 1): ?>
            <?php if (!count($products)): ?>
                <div class="index-box index-box1 pt10">
                    <div class="index-box1-left box-shadow">
                        <div class="box1-tit-wrapper">
                            <span class="tit">专享商品：</span>
                            <span class="tit-text">您当前企业账户专享的采购商品</span>
                            <span class="items-num"> 共 <em class="color-red">0</em>件相关商品</span>
                        </div>

                        <div class="box1-cont">
                            <div class="no-items">
                                <span class="icon-img_empty bg-img_empty"></span>
                                <p class="text">
                                    您当前还没有企业专享商品
                                    <span class="span02"></span>
                                </p>
                                <p class="text02"></p>
                                <a href="<?php echo base_url('office'); ?>"
                                   class="link-home">先去文具1号商城逛逛＞</a>
                            </div>
                        </div>
                    </div>

                    <div class="index-box1-right index-box1-right-notice box-shadow">
                        <div class="box1-tit-wrapper">
                            <span class="tit">公告</span>
                            <a target="_blank" href="<?php echo $this->config->item('shop_url'); ?>mMBulletin.html"
                               class="get-more">查看更多> </a>
                        </div>
                        <div class="box1-cont box1-cont-notice">
                            <ul class="ul-notice">
                                <?php if (isset($datas)): ?>
                                    <?php foreach ($datas as $nots): ?>
                                        <li>
                                            <a href="<?php echo $this->config->item('shop_url'); ?>MBulletin_Content_<?php echo $nots['cde_id']; ?>.html"
                                               class="notice-item"><?php print_r($nots['cde_title']); ?></a></li>
                                    <?php endforeach; ?>
                                <?php endif; ?>
                            </ul>
                        </div>
                    </div>
                </div>
            <?php else: ?>
                <div class="box1-cont">
                    <div class="index-box index-box3 box-shadow">
                        <div class="box1-tit-wrapper">
                            <span class="tit">专享商品：</span>
                            <span class="tit-text">为您企业定制的专属采购商品</span>
                            <span class="items-num"> 共 <em
                                        class="color-red"><?php echo count($products) ?></em>件相关商品</span>
                        </div>
                        <div class="box1-tit-wrapper box1-tit-wrapper2">
                            <span class="tit index-box2-tit">专享商品采购TOP10</span>
                            <a href="<?php echo base_url('office'); ?>" class="get-more">查看更多> </a>
                        </div>
                        <div class="pro-top10">
                            <div class="scroll-outer">
                                <div id="scroll" class="owl-carousel scroll">
                                    <?php if (isset($products)): ?>
                                        <?php foreach ($products as $pro): ?>
                                            <div class="item">
                                                <img src="<?php echo $pro['goods_main_img'] ?>" alt="">
                                                <div class="shd"><a
                                                            href="<?php echo base_url('goods/detail'); ?>?id=<?php echo $pro['goods_id']; ?>"></a>
                                                </div>
                                                <div class="txt">
                                                    <p class="price"><em>￥</em>
                                                        <?php if ($pro['adjust_price']): ?>
                                                            <?= $pro['adjust_price'] ?>
                                                        <?php else: ?>
                                                            <?= $pro['goods_price'] ?>
                                                        <?php endif; ?></p>
                                                    <a href="<?php echo base_url('goods/detail'); ?>?id=<?php echo $pro['goods_id']; ?>"
                                                       class="intro"><?php echo $pro['goods_name'] ?></a>
                                                    <a href="<?php echo base_url('office'); ?>"
                                                       class="link-wjyh">文具1号超市</a>
                                                </div>
                                                <p class="txt-btm">
                                                    <!--                                                    <span class="sale">月销量：<em>-->
                                                    <?php //echo $pro['statistics'];?><!--</em></span>-->
                                                    <span class="appraise">评价：<?php echo $pro['comments']; ?></span>
                                                </p>
                                            </div>
                                        <?php endforeach; ?>
                                    <?php endif; ?>
                                </div>
                            </div>

                        </div>
                    </div>

                </div>
            <?php endif; ?>

            <!--  清单商品 manage /user-->
        <?php else: ?>
            <?php if (empty($goods) && empty($products)): ?>
                <div class="index-box index-box1 pt10">
                    <div class="index-box1-left box-shadow">
                        <div class="box1-tit-wrapper">
                            <span class="tit">清单商品：</span>
                            <span class="tit-text">您的上级账户为您定制的采购清单（温馨提示：清单外的商品需通过审批购买）</span>
                            <span class="items-num"> 共 <em class="color-red">0</em>件相关商品</span>
                        </div>
                        <div class="box1-cont">
                            <div class="no-items">
                                <span class="icon-img_empty bg-img_empty"></span>
                                <p class="text">
                                    您当前还没有清单限购商品或企业专享商品
                                    <span class="span02">可联系您的上级账户为您定制</span>
                                </p>
                                <p class="text02"></p>
                                <a href="<?php echo base_url('office'); ?>"
                                   class="link-home">先去文具1号商城逛逛＞</a>
                            </div>
                        </div>
                    </div>

                    <div class="index-box1-right index-box1-right-notice box-shadow">
                        <div class="box1-tit-wrapper">
                            <span class="tit">公告</span>
                            <a href="<?php echo $this->config->item('shop_url'); ?>mMBulletin.html" class="get-more">查看更多> </a>
                        </div>
                        <div class="box1-cont box1-cont-notice">
                            <ul class="ul-notice">
                                <?php if (isset($datas)): ?>
                                    <?php foreach ($datas as $nots): ?>
                                        <li>
                                            <a href="<?php echo $this->config->item('shop_url'); ?>MBulletin_Content_<?php echo $nots['cde_id']; ?>.html"
                                               class="notice-item"><?php print_r($nots['cde_title']); ?></a></li>
                                    <?php endforeach; ?>
                                <?php endif; ?>
                            </ul>
                        </div>
                    </div>
                </div>
            <?php else: ?>
                <?php if (count($goods)): ?>
                    <div class="index-box index-box3 box-shadow">
                        <div class="box1-tit-wrapper">
                            <span class="tit">清单商品:</span>
                            <span class="tit-text">您的上级账户为您定制的采购清单（温馨提示：清单外的商品需通过审批购买）</span>
                            <span class="items-num"> 共 <em
                                        class="color-red"><?php echo count($goods) ?></em>件相关商品</span>
                        </div>
                        <div class="box1-tit-wrapper box1-tit-wrapper2">
                            <span class="tit index-box2-tit">清单采购商品TOP10</span>
                            <a href="<?php echo base_url('office/lists'); ?>" class="get-more">查看更多> </a>
                        </div>
                        <div class="pro-top10">
                            <div class="scroll-outer">
                                <div id="scroll" class="owl-carousel scroll">
                                    <?php if (isset($goods)): ?>
                                        <?php foreach ($goods as $god): ?>
                                            <div class="item">
                                                <img src="http://www.wjyh.com<?php echo($god['default_image']) ?>"
                                                     alt="">
                                                <div class="shd"><a
                                                            href="<?php echo base_url('goods/detail'); ?>?id=<?php echo $god['goods_id']; ?>"></a>
                                                </div>
                                                <div class="txt">
                                                    <p class="price"><em>￥</em><?php echo $god['price'] ?></p>
                                                    <a href="<?php echo base_url('goods/detail'); ?>?id=<?php echo $god['goods_id']; ?>"
                                                       class="intro"><?php echo $god['goods_name'] ?></a>
                                                    <a href="<?php echo base_url('office'); ?>"
                                                       class="link-wjyh">文具1号超市</a>
                                                </div>
                                                <p class="txt-btm">
                                                    <!--                                                    <span class="sale">月销量：<em>-->
                                                    <?php //echo $god['goods_statistics12'] ?><!--</em></span>-->
                                                    <span class="appraise">评价：<?php echo $god['comments'] ?></span>
                                                </p>
                                            </div>
                                        <?php endforeach; ?>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endif; ?>

                <?php if (count($products)): ?>
                    <div class="box1-cont">
                        <div class="index-box index-box3 box-shadow">
                            <div class="box1-tit-wrapper">
                                <span class="tit">专享商品：</span>
                                <span class="tit-text">为您企业定制的专属采购商品</span>
                                <span class="items-num"> 共 <em
                                            class="color-red"><?php echo count($products) ?></em>件相关商品</span>
                            </div>
                            <div class="box1-tit-wrapper box1-tit-wrapper2">
                                <span class="tit index-box2-tit">专享商品采购TOP10</span>
                                <a href="<?php echo base_url('office'); ?>" class="get-more">查看更多> </a>
                            </div>
                            <div class="pro-top10">
                                <div class="scroll-outer">
                                    <div id="scroll1" class="owl-carousel scroll">
                                        <?php if (isset($products)): ?>
                                            <?php foreach ($products as $pro): ?>
                                                <div class="item">
                                                    <img src="<?php echo $pro['goods_main_img'] ?>" alt="">
                                                    <div class="shd"><a
                                                                href="<?php echo base_url('goods/detail'); ?>?id=<?php echo $pro['goods_id']; ?>"></a>
                                                    </div>
                                                    <div class="txt">
                                                        <p class="price"><em>￥</em><?php echo $pro['goods_price'] ?></p>
                                                        <a href="<?php echo base_url('goods/detail'); ?>?id=<?php echo $pro['goods_id']; ?>"
                                                           class="intro"><?php echo $pro['goods_name'] ?></a>
                                                        <a href="<?php echo base_url('office'); ?>"
                                                           class="link-wjyh">文具1号超市</a>
                                                    </div>
                                                    <p class="txt-btm">
                                                        <!--                                                        <span class="sale">月销量：<em>-->
                                                        <?php //echo $pro['statistics'];?><!--</em></span>-->
                                                        <span class="appraise">评价：<?php echo $pro['comments']; ?></span>
                                                    </p>
                                                </div>
                                            <?php endforeach; ?>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endif; ?>
            <?php endif; ?>

            <!--        员工福利商品TOP10-->

        <?php endif; ?>

        <!--       优质办公用品TOP10-->
        <div class="index-box index-box2 box-shadow">
            <div class="box1-tit-wrapper">
                <span class="tit index-box2-tit">优质办公用品TOP10</span>
                <a href="<?php echo base_url('office'); ?>" class="get-more">查看更多> </a>
            </div>
            <div class="pro-top10">
                <div class="scroll-outer">
                    <div id="scroll2" class="owl-carousel scroll">
                        <?php if (isset($datass) && is_array($datass) && count($datass)): ?>
                            <?php foreach ($datass as $rs): ?>
                                <div class="item">
                                    <img src="<?php echo $rs['image'] ?>" alt="">
                                    <div class="shd"><a
                                                href="<?php echo base_url('goods/detail'); ?>?id=<?php echo $rs['goods_id']; ?>"></a>
                                    </div>
                                    <div class="txt">
                                        <p class="price"><em>￥</em>
                                            <?php if ($rs['adjust_price']): ?>
                                                <?php echo $rs['adjust_price'] ?>
                                            <?php else: ?>
                                                <?php echo $rs['price'] ?>
                                            <?php endif; ?>
                                        </p>
                                        <a href="#" class="intro"><?php echo $rs['name'] ?></a>
                                        <a href="javascript"
                                           class="link-wjyh"><?php echo $rs['commercial_tenant_name'] ?></a>
                                        <p class="txt-btm">
                                            累计购买：<?php echo $rs['sale'] ?>件
                                        </p>
                                    </div>
                                </div>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <?php $this->load->view('common/bottom.php'); ?>

</div>
<div class="mask none"></div>
<!--隐藏 添加 class  none-->
<div class="pop pop-account-activation bg-padding-inside none">
    <a href="javascript:;" class="close bg-btn_close_n"></a>
    <p class="top-tit">
        <span class="bg-logo_popup"></span>
    </p>
    <div class="cont">
        <p class="tit">XXX，您好！</p>
        <p class="intro">
            您当前账号是由上级账户XXX创建请确认是否激活该账号！<br>
            激活后请及时进入个人中心修改密码！
        </p>
        <div class="btn-box">
            <a href="javascript:;" class="btn-submit">激活</a>
            <a href="javascript:;" class="btn-cancel">取消</a>
        </div>
    </div>
</div>
<!--账户激活-->
<?php if (isset($delayed_bill) && $delayed_bill): ?>
    <div class="pop pop-account-activation bg-padding-inside  "
         style="height:253px;">
        <a href="javascript:void(0);" onclick="$('.mask').addClass('none');" class="close bg-btn_close_n"></a>
        <p class="top-tit">
            <span class="bg-logo_popup"></span>
        </p>
        <div class="cont">
            <p class="tit">温馨提示</p>
            <p class="intro">
                您当前尚有一笔账单未还清，请及时还款。
            </p>
            <div class="btn-box">
                <?php if ($delayed_bill['type'] == 1): ?>
                    <a href="<?php echo base_url('bill/bill_index'); ?>?bill_id=<?php echo $delayed_bill['id']; ?>"
                       class="btn-submit">查看账单</a>
                <?php endif; ?>
                <a href="<?php echo base_url('pay/index'); ?>?bn=<?php echo $delayed_bill['bill_bn']; ?>"
                   class="btn-cancel">我要还款</a>
            </div>
        </div>
    </div>
    <!--账期提醒 温馨提示-->
    <script>
        $('.mask').removeClass('none');
    </script>
<?php endif; ?>

<!--申请调整预算 仅可用-->
<div class="pop pop-adjustment-budget bg-padding-inside none">
    <a href="javascript:;" class="close bg-btn_close_n"></a>
    <p class="top-tit">
        <span class="bg-logo_popup"></span>
    </p>
    <div class="cont adjustment-budget-cont">
        <p class="tit">申请调整预算</p>
        <div class="adjustment-budget-intro">
            <p class="adjustment-budget-row">
                <span class="name">单 品 额 度：</span>
                <span class="text">￥10,000.00</span>
                <span class="unit01">每月</span>
            </p>
            <p class="adjustment-budget-row">
                <span class="name">期望调整至：</span>
                <span class="text">
          <input type="text" class="adjustment-budget-input" placeholder="请输入金额">
          <em class="unit02">元</em>
        </span>
                <select name="unit" id="adjustment-budget-select" class="adjustment-budget-select">
                    <option value="月" selected>月</option>
                    <option value="天">天</option>
                </select>
            </p>
            <p class="adjustment-budget-row">
                <span class="name">其他：</span>
                <span class="text text-textarea">
          <textarea name="other" id="adjustment-budget-textarea" class="adjustment-budget-textarea" cols="30" rows="10"
                    placeholder="请输入内容"></textarea>
        </span>
            </p>
            <p class="p-notice">申请将发送至您上级账户进行确认</p>
        </div>
        <button class="adjustment-budget-submit">确 认 申 请</button>
    </div>
</div> <!--申请调整预算-->

<!--申请调整预算-->
<div class="pop pop-adjustment-budget bg-padding-inside none" style="height: 610px">
    <a href="javascript:;" class="close bg-btn_close_n" onclick=""></a>
    <p class="top-tit">
        <span class="bg-logo_popup"></span>
    </p>
    <div class="cont adjustment-budget-cont">
        <p class="tit">申请调整预算</p>
        <div class="adjustment-budget-intro">
            <p class="adjustment-budget-row">
                <span class="name">可 用 预 算：</span>
                <span class="text">￥10,000.00</span>
                <span class="unit01">每月</span>
            </p>
            <p class="adjustment-budget-row">
                <span class="name">期望调整至：</span>
                <span class="text">
          <input type="text" class="adjustment-budget-input" placeholder="请输入金额">
          <em class="unit02">元</em>
        </span>
                <select name="unit" id="adjustment-budget-select2" class="adjustment-budget-select">
                    <option value="月" selected>月</option>
                    <option value="天">天</option>
                </select>
            </p>
            <p class="adjustment-budget-row">
                <span class="name">单 品 额 度：</span>
                <span class="text">￥10,000.00</span>
            </p>
            <p class="adjustment-budget-row">
                <span class="name">期望调整至：</span>
                <span class="text" style="width:342px;">
          <input type="text" style="width:342px;" class="adjustment-budget-input adjustment-budget-input2"
                 placeholder="请输入金额">
          <em class="unit02">元</em>
        </span>
            </p>
            <p class="adjustment-budget-row">
                <span class="name">其他：</span>
                <span class="text text-textarea">
          <textarea name="other" id="adjustment-budget-textarea2" class="adjustment-budget-textarea" cols="30" rows="10"
                    placeholder="请输入内容"></textarea>
        </span>
            </p>
            <p class="p-notice">申请将发送至您上级账户进行确认</p>
        </div>
        <button class="adjustment-budget-submit">确 认 申 请</button>
    </div>
</div>


<div class="pop pop-new-cost-center bg-padding-inside none" id="upload-file"
     style="height: auto;margin: 0px auto;width: auto;">
    <p class="top-tit">
        <span class="bg-logo_popup"></span>
        <!--        <a href="javascript:;" class="close bg-btn_close_n" onclick="layer.closeAll()"></a>-->
    </p>
    <div class="cont adjustment-budget-cont">
        <p class="tit">盖章合同照片压缩文件夹</p>
        <form method="post" id="upload_contract_form" action="<?php echo base_url(); ?>index/upload_contract"
              enctype="multipart/form-data">
            <input type="file" name="file" id="contract-pic" class="create-cost-center-input" value="">
        </form>
        <p class="intro"><font color="red">*</font> 支持zip,rar,tar,7z格式压缩文件<br/><font color="red">*</font> 压缩文件大小不超过<font
                    color="red">20M</font></p>
        <button class="adjustment-budget-submit" onclick="do_upload()">上传</button>
    </div>
</div>


<!--申请调整预算-->
<script type="text/javascript" src="public/js/jquery.min.js"></script>
<script src="public/js/layui/layui.js"></script>
<script type="text/javascript" src="public/js/index.js"></script>
<script type="text/javascript" src="public/js/owl.carousel.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('#scroll').owlCarousel({
            items: 5,
            autoPlay: false,
            navigation: true,
            navigationText: ["", ""],
            scrollPerPage: true
        });
        $('#scroll1').owlCarousel({
            items: 5,
            autoPlay: false,
            navigation: true,
            navigationText: ["", ""],
            scrollPerPage: true
        });
        $('#scroll2').owlCarousel({
            items: 5,
            autoPlay: false,
            navigation: true,
            navigationText: ["", ""],
            scrollPerPage: true
        });


    });

    layui.use(['form', 'layedit', 'laydate', 'upload'], function () {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit;
        var $ = layui.jquery
            , upload = layui.upload;
    });

    function open_upload() {
        layer.open({
            type: 1,
            content: $('#upload-file') //这里content是一个DOM，注意：最好该元素要存放在body最外层，否则可能被其它的相对元素所影响
        });
    }

    function do_upload() {
        if (!$("#contract-pic").val()) {
            layer.msg('请先选择照片!')
        } else {
            function checkType() {
                //得到上传文件的值
                var fileName = $("#contract-pic").val();
                //返回String对象中子字符串最后出现的位置.
                var seat = fileName.lastIndexOf(".");
                //返回位于String对象中指定位置的子字符串并转换为小写.
                var extension = fileName.substring(seat).toLowerCase();
                //判断允许上传的文件格式
                var allowed = [".rar", ".tar", ".zip", ".7z"];
                for (var i = 0; i < allowed.length; i++) {
                    if (!(allowed[i] != extension)) {
                        return true;
                    }
                }
                layer.alert("不支持" + extension + "格式<br/>请重新选择zip,rar,tar格式压缩文件！");
                return false;
            }

            if (checkType()) {
                $("#upload_contract_form").submit();
            }
        }
    }


    $(".bg-btn_call_n").on("click", function (e) {
        if ($("#kf").css('display') == 'block') {
            $("#kf").hide();
        } else {
            $("#kf").show();

            $(document).on("click", function () {
                $("#kf").hide();
            });
            e.stopPropagation();
        }
    });
    $("#kf").on("click", function (e) {
        e.stopPropagation();
    });
    $(".index-myInfo-btm-item").mouseover(function () {
        $(this).find('.num').css('color', '#db3512');
    });
    $('.index-myInfo-btm-item').mouseout(function () {
        $(this).find('.num').css('color', '#c40000');
        // $(this).find('.layui-nav-more').removeClass('layui-nav-mored')
    });

</script>
<style type="text/css">
    .layui-layer-title {
        display: none;
    }

    .payment-audit-status-top .show-more {
        right: 138px !important;
    }

    #kf .cont {
        line-height: 20px;
        text-align: center;
    }

    #kf .cont span {
        line-height: 20px;
        vertical-align: middle;
    }

    .pro-top10 .scroll .txt {
        position: relative;
        height: 71px;
    }

    .pro-top10 .scroll .item {
        height: 349px;
    }
</style>
</body>
</html>